package de.eventdroid;

import java.util.List;

import de.eventdroid.helper_classes.GeoDataHandler;
import de.eventdroid.helper_classes.RESTHandler;
import android.app.Activity;
import android.app.ActivityManager;
import android.app.ActivityManager.RunningTaskInfo;
import android.app.AlertDialog;
import android.app.ProgressDialog;
import android.app.SearchManager.OnDismissListener;
import android.content.ComponentName;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.widget.Toast;

public class StartScreen extends Activity {
	
	/* Actual Intent for further actions */
    private Intent actualIntent = new Intent();
	
	/** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.eventdroid_start_screen);
        
    }
    
    /** Click Event Handler for the buttons on the Startscreen */
    public void onStartMenuButtonClick(final View view) {
    	switch (view.getId()) {
    	case R.id.btn_find_event:
    		startActivity(new Intent(this, EventSearchScreen.class));
    		break;
    	case R.id.btn_find_location:
    		startActivity(new Intent(this, LocationSearchScreen.class));
    		break;
    	case R.id.btn_login:
    		startActivity(new Intent(this, LoginScreen.class));
    		break;
    	}
    }
    
    /**
     * Creation Class for the menu
     */
    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        MenuInflater inflater = getMenuInflater();
        inflater.inflate(R.menu.menu, menu);
        return true;
    }
    
    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
    	
        switch (item.getItemId()) {
            case R.id.menu_startscreen:     
            	startActivity(new Intent(this, StartScreen.class));           	
            	break;
        }
        return true;
    }    
    
}